numbers=[4,1,2,7,3,9]
#升序
numbers.sort()
print(numbers)
#降序
numbers.sort(reverse=True)
print(numbers)
#按字符串排序
fruits=['banana','apple','kiwi','orange']
fruits.sort(key=len)
print(fruits)